import { createRouter, createWebHashHistory } from "vue-router"
const Yuwen = () => import(/*webpackChunkName:"yuwen"*/ '../components/A.vue')
const Shuxue = () => import(/*webpackChunkName: "shuxue"*/ '../components/HelloWorld.vue')


const routes: any = [
  {path: '/yuwen', name: 'yuwen', component: Yuwen},
  {path: '/shuxue', name: 'shuxue', component: Shuxue},
  {path: '/', redirect: '/yuwen'}
]


const router = createRouter({
  history: createWebHashHistory(import.meta.env.BASE_URL),
  routes
})


router.beforeEach((to, from, next) => {
  next()
})

export default router